//package com.amigo.online.provider.search.rocketmq.consumer;
//
//import java.util.List;
//
//import javax.annotation.Resource;
//
//import org.apache.solr.client.solrj.SolrClient;
//import org.apache.solr.client.solrj.response.UpdateResponse;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.stereotype.Component;
//
//import com.alibaba.fastjson.JSONObject;
//import com.amigo.online.provider.search.rocketmq.PushMessage;
//import com.amigo.online.provider.search.rocketmq.model.BaseMqSendModel;
//
//@Component("VideoDeleteToSolrConsumer")
//public class VideoDeleteToSolrConsumer implements PushMessage{
//	private static final Logger log = LoggerFactory.getLogger(VideoDeleteToSolrConsumer.class);
//	@Resource(name="SolrClient_video") 
//	private SolrClient solrClient_video;
//	@SuppressWarnings({ "rawtypes", "unchecked" })
//	@Override
//	public void handleMessage(BaseMqSendModel baseMqSendModel) {
//		try {
//			log.info("videodelete消费开始进入solr索引库......");
//			JSONObject obj = baseMqSendModel.getSendContentBean(JSONObject.class);
//			Object id = obj.get("id");
//			//传入list的话则批量删除
//			if (id instanceof List && !((List) id).isEmpty()) {
//				UpdateResponse rs = solrClient_video.deleteById((List) id);
//				System.out.println("批量删除成功，" + rs.getStatus());
//			} else {
//				UpdateResponse rs = solrClient_video.deleteById(id + "");
//				System.out.println("删除成功，" + rs.getStatus());
//			}
//			solrClient_video.commit();
//			log.info("videodelete消费结束进入solr索引库......");
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//	}
//
//}
